package cn.wolfcode.gitlab.controller;

import cn.wolfcode.gitlab.domain.Book;
import cn.wolfcode.gitlab.service.IBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/books")
public class BookController {

    @Autowired
    private IBookService bookService;

    @GetMapping("/get")
    public Book get(String name) {
        System.out.println("修复了一个bug");
        return bookService.get(1L);
    }

    @GetMapping("/hello")
    public void hello() {
        System.out.println("猜猜这是什么");
    }
}
